Skip to content

fix(watch-pr): distinguish fork heads during stack discovery - #801

Merged
poteto merged 1 commit into
mainfrom
lauren/watch-pr-fork-stack-identity-a7d7
Oct 23, 2026
Merged

poteto merged 1 commit into
mainfrom
lauren/watch-pr-fork-stack-identity-a7d7

Conversation

@poteto

@poteto poteto commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Replaces #664 by @rudycelekli. This is the same commit, rebased onto current main. The author stays Rudy Celekli.

The fork branch could not take the rebase. The rebase brings in main's newer .github/workflows/validate-plugins.yml, and GitHub refuses that workflow update on a fork from an app without the workflows permission. A fork PR's CI also waits for maintainer approval, so this branch on cursor/plugins lets CI run.

Problem

watch-pr --stack connects PRs by their head branch name alone. A fork PR opened from main against upstream main is therefore treated as a parent of every PR based on main, and the parent walk loops indefinitely. Open PRs #173, #176, and #330 already have that shape in this repository.

Change

Read isCrossRepository from gh pr list, validate that field at the reader boundary, and use only upstream heads as possible parent branches. Stop descendant traversal at fork heads because upstream PR base refs cannot target those fork branches. The Claude Code harness copy is regenerated.

Verification on the rebased tree

  • node scripts/validate-plugins.mjs: all plugins validated.
  • node scripts/generate-pstack-harness-trees.mjs --check: up to date.
  • node scripts/check-pstack-docs.mjs: 0 problems.
  • bun test in pstack/skills/poteto-mode/scripts: 72 pass, 0 fail. bun run typecheck (strict): exit 0.
  • node --test pstack/skills/*/scripts/test/*.test.mjs: 58 pass, 0 fail, 92 skipped (no TLC on this machine).

No pstack version change.

Open in Web Open in Cursor 

@poteto
poteto merged commit 96dec8e into main Oct 23, 2026
2 checks passed
caelaxie added a commit to pstack-ports/devin-pstack that referenced this pull request Oct 24, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
synced to
[`e73df47`](cursor/plugins@e73df47).
compared `4ec7ffa..e73df47` for `pstack/`. `origin/main` is that commit.
version is `0.15.32` in `plugin.json`, `.devin-plugin/plugin.json`, and
the readme marker.

ported:
-
[`076f4b2`](cursor/plugins@076f4b2)
([#791](cursor/plugins#791)) statechart skill
update and the pele renderer. scripts copied verbatim, including the
removal of the outputfolder model. `SKILL.md` keeps `/pstack:statechart`
and `triggers: [user]`.
-
[`642289e`](cursor/plugins@642289e)
([#792](cursor/plugins#792)) bump to 0.15.31,
folded into the 0.15.32 bump in `plugin.json` and
`.devin-plugin/plugin.json`.
-
[`00d5dec`](cursor/plugins@00d5dec)
([#794](cursor/plugins#794)) generated verify
skills read each model-check result with `/pstack:statechart`.
-
[`3c0fdb4`](cursor/plugins@3c0fdb4)
([#797](cursor/plugins#797)) add the
ketchup-video skill. poteto-help, the readme skill table, and guide page
10 match. slash commands keep the `/pstack:` prefix.
`disable-model-invocation: true` stays `triggers: [user]`.
-
[`b1a1298`](cursor/plugins@b1a1298)
([#798](cursor/plugins#798)) bump to 0.15.32, in
`plugin.json`, `.devin-plugin/plugin.json`, and the readme marker.
-
[`7054003`](cursor/plugins@7054003)
([#800](cursor/plugins#800)) reflect edits leave
`plugins/cache/` (devin's checkout is
`~/.local/share/devin/cli/plugins/cache`). the destination is
`.devin/skills/<skill>/` or `~/.config/devin/skills/<skill>/`. no pr and
no push.
-
[`96dec8e`](cursor/plugins@96dec8e)
([#801](cursor/plugins#801)) watch-pr
distinguishes fork heads. the pstack scripts were copied verbatim.
-
[`fe096ef`](cursor/plugins@fe096ef)
([#802](cursor/plugins#802)) watch-pr caps
polling sleeps at the deadline. scripts copied verbatim.
-
[`86c2448`](cursor/plugins@86c2448)
([#803](cursor/plugins#803)) check-plan
recognizes matching inline code delimiters. scripts copied verbatim.
-
[`3c596e7`](cursor/plugins@3c596e7)
([#804](cursor/plugins#804)) orch prefers the
active pr. the changed files are under
`pstack/skills/poteto-mode/scripts/orch/` and were copied verbatim.
-
[`f83fbe6`](cursor/plugins@f83fbe6)
([#805](cursor/plugins#805)) worktree-audit
reads transcript mtimes with gnu stat and date. kept `rg -a` and the
devin `sessions.db` directory.
-
[`e73df47`](cursor/plugins@e73df47)
([#807](cursor/plugins#807)) swarm phase a is
numbered 1 to 4, phase b points at step 3, and phase d asks for a result
table.

skipped:
-
[`a0b0ad9`](cursor/plugins@a0b0ad9)
([#806](cursor/plugins#806)) claude code
auto-update note. it sits in the claude code install section, and this
readme has no such section.
- `harness/pstack/claude-code/` copies in every commit above. this port
does not carry the generated claude code tree.
- [#792](cursor/plugins#792) and
[#798](cursor/plugins#798)
`pstack/.cursor-plugin/plugin.json`. cursor packaging. the version bump
lands in `.devin-plugin/plugin.json` instead.

harness proof (`devin plugins install`, `devin plugins list`,
`/pstack:statechart`, `/pstack:ketchup-video`, `/pstack:poteto-mode`)
will follow as a comment. the devin cli can't log in from this cloud
environment.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-1991bcdf-ceba-5d68-8535-0ec4d1228e4e?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-1991bcdf-ceba-5d68-8535-0ec4d1228e4e&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Kaitian Xie <[email protected]>
kpeez added a commit to kpeez/agent-toolbox that referenced this pull request Oct 28, 2026
…-program (#201)

## Why

Pull upstream pstack changes since pin 7054003 into swe. Pin moves to
0f77cd5. swe 1.21.21.

## Upstream range

`7054003..0f77cd5` (14 commits, cursor/plugins#801 to #1043).

## Kyle decisions

- statechart: import the full TypeScript compiler tree with its test
corpus (406 files). It replaces the 26 copied `.mjs` scripts. Class
`copied`.
- run-program: port the agentic orchestrate rewrite and delete
`skills/swe-mode/references/run-program.md` (program store, inbox,
ledger, frontier).

## Review lines

- statechart SKILL.md (copied): taken from upstream, with the `/swe:`
prefix and `argument-hint`. New `references/render.md`.
- orchestrate: ported as the new run-program playbook. Links in docs/07
updated.
- autopilot-full: ported. Blocking rule for findings, wording-only
change needs no verifier, rebase on concurrent change, push each
finished unit, parked follow-ups in reply.
- autopilot-stack: ported. Now autopilot-full without the merge; stack
only on a dependency.
- multi-phase-plan: ported (playbook and reference).
- babysit: skipped. swe text already covers both autopilot owners.
- opening-a-pr: skipped. swe has no interrogate step.
- poteto-mode: ported the first-message goal trigger and
explain-the-number wording. Skipped the background-subagent default
(logged).
- principle-explain-the-number: ported "write the decision before you
run".
- ketchup-video (copied): taken from upstream; subtitles. Docs and help
say "subtitled".
- poteto-help, recipes: ported autopilot-stack, ketchup-video, and
statechart wording.
- create-formal-verification-skill, docs/06, README: ported the new
statechart description.
- check-plan.mjs: ported the multi-backtick code-span fix to
`check_plan.py`.
- worktree-audit.sh: skipped. swe script already handles GNU and BSD
stat and date.
- swarm: skipped. swe numbering is already correct.
- interrogate: skipped (logged). swe uses the review brief. Deleted
upstream reference items removed from `upstream.json`.
- docs/04, docs/10: skipped. arena and interrogate text; swe dropped
both.

## Other fixes

- `.gitignore`: add `node_modules/` (statechart `npm install` writes
it).

## Verification

- `pstack_sync.py check`: ok, 573 pinned files covered.
- statechart `npm test` (Node 22.22, `JAVA_TOOL_OPTIONS` unset): 334
tests, 267 pass, 0 fail, 67 skipped because `TLA2TOOLS` is not set in
the cloud container.
- `claude plugin validate --strict` on the root and `plugins/swe`: pass.
- Relative links in changed Markdown: all resolve.
- `check_plan.py` regex checked against the upstream test cases;
`py_compile` pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants